<template>
	<view class="content">
		<view v-if="!content" style="width: 100%; margin-top: 50rpx; text-align: center;">
			<u-loading mode="flower" size="50"></u-loading>
		</view>
		<u-parse v-else :html="content" style="overflow: unset;"></u-parse>
	</view>
</template>

<script>
	import { bannersDetail } from '../../api/api.js'
	export default {
		data() {
			return {
				content: ''
			}
		},
		onLoad(query) {
			this.getBannerDetail(query.id)
		},
		methods: {
			getBannerDetail(id){
				bannersDetail({id:id}).then(resp=>{
					uni.setNavigationBarTitle({
					    title: resp.title
					})
					this.content = resp.content
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.content{
	padding: 20rpx 40rpx;
	overflow: auto;
	height: 100vh;
}
</style>
